package com.cndw.kungfu.vo;

import java.io.Serializable;
/**
 *通天图 神兵阵闯关时间记录 
 */
public class PassThroughRecordVO implements Comparable<PassThroughRecordVO>, Serializable{
	private static final long serialVersionUID = 9209065964322906853L;
	private long playerId;
	private String name;
	private int ranking;
	private int level;
	/**
	 * 层数
	 */
	private int sortLevel;
	/**
	 * 通关时间
	 */
	private int spendTime;
	private int vocationId;
	private int time;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public int getSpendTime() {
		return spendTime;
	}

	public void setSpendTime(int spendTime) {
		this.spendTime = spendTime;
	}

	public int getSortLevel() {
		return sortLevel;
	}

	public void setSortLevel(int sortLevel) {
		this.sortLevel = sortLevel;
	}
	
	public long getPlayerId() {
		return playerId;
	}

	public void setPlayerId(long playerId) {
		this.playerId = playerId;
	}

	public int getVocationId() {
		return vocationId;
	}

	public void setVocationId(int vocationId) {
		this.vocationId = vocationId;
	}

	public int getRanking() {
		return ranking;
	}

	public void setRanking(int ranking) {
		this.ranking = ranking;
	}

	public int getTime() {
		return time;
	}

	public void setTime(int time) {
		this.time = time;
	}

	@Override
	public int compareTo(PassThroughRecordVO o) {
		if (o.getSortLevel() < getSortLevel()) {
			return -1;
		} else if (o.getSortLevel() > getSortLevel()) {
			return 1;
		} else {
			if (o.getSpendTime() > getSpendTime()) {
				return -1;
			} else if (o.getSpendTime() < getSpendTime()) {
				return 1;
			} else {
				if (o.getTime() < getTime()) {
					return -1;
				} else if (o.getTime() > getTime()) {
					return 1;
				} else {
					if (o.getPlayerId() == getPlayerId()) {
						return 0;
					} else {
						return 1;
					}
				}
			}
		}
	}
}
